package com.one.blocks.rbac.convert;

import com.one.blocks.mvc.convert.GrantConvert;
import com.one.blocks.mvc.domain.GrantDomain;
import com.one.blocks.rbac.util.SubjectHelper;

import java.time.LocalDateTime;

/**
 * @author <a href="mailto:idler41@163.con">linfuxin</a> created on 2024-01-04 15:19:39
 */
public interface BaseGrantConvert<E extends GrantDomain<I, K, Integer>, I, K> extends GrantConvert<E, I, K, Integer> {

    @Override
    default Integer getCreateId() {
        return SubjectHelper.getSubjectId();
    }

    @Override
    default LocalDateTime getCreateTime() {
        return SubjectHelper.getAccessTime();
    }
}
